<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ page contentType="text/html;charset=UTF-8" language="java"
         pageEncoding="UTF-8"%>
<html>
<head>
    <title>查询列表</title>
    <style type="text/css">
        a{text-decoration: none}
        table{
            border: 1px solid orange;
            width: 1000px;
            margin: 10px auto;
            border-collapse: collapse;
        }
        tr{
            border: 1px solid orange;
            height: 50px;
            text-align: center;
        }
        th{
            border: 1px solid orange;
        }
        td{
            border: 1px solid orange;
            text-align: center;
        }
        h2 {
            text-align: center;
        }

    </style>
    <script type="text/javascript">
    </script>
</head>
<body>
<h2>欢迎${user.username}</h2>
<ul id="u">
    <a href="login.jsp" id="exit" target="_blank">退出</a>
</ul>
<table>
    <tr>
        <th>编号</th>
        <th>姓名</th>
        <th>生日</th>
        <th>性别</th>
        <th>职业</th>
        <th>住所</th>
        <th>电话</th>
        <th>操作</th>
    </tr>
    <c:forEach items="${profileList}" var="profile" >
        <tr>
            <td>${profile.id}</td>
            <td>${profile.name}</td>
            <td>${profile.birthday}</td>
            <td>${profile.gender}</td>
            <td>${profile.career}</td>
            <td>${profile.address}</td>
            <td>${profile.mobile}</td>
            <td><button type="submit" id="bu1">明细</button> &nbsp;<button type="button" id="bu2">修改</button> &nbsp;
                <script type="text/javascript">
                    var buq = document.getElementById("bu1");
                    bu1.onclick=function () {
                        location.href='${pageContext.request.contextPath}/MyProfile?method=detail'
                    }

                </script>
            </td>
        </tr>
    </c:forEach>

</table>
</body>
</html>
